/*
 * @Description:
 * @Author: william
 * @Date: 2025-02-05 09:08:10
 * @LastEditors: william
 * @LastEditTime: 2025-09-10 16:34:51
 */

/**
 * @description 下拉框select的选项
 */

/**
 * @description 公共函数用来回显文本
 */
export const getOptionText = (
  dataList,
  value,
  defaultVal = '',
  key = 'label'
) => {
  const obj = dataList.find(item => item.value === value + '')
  return obj ? obj[key] : defaultVal
}

// 在线状态
export const onlineOptions = [
  {
    get label() {
      return g_t('public.unActive')
    },
    value: '-1'
  },
  {
    get label() {
      return g_t('public.offLine')
    },
    value: '0'
  },
  {
    get label() {
      return g_t('public.onLine')
    },
    value: '1'
  }
]

// 性别：1-男，2-女
export const genderOptions = [
  {
    get label() {
      return g_t('fleet.male')
    },
    value: '1'
  },
  {
    get label() {
      return g_t('fleet.female')
    },
    value: '2'
  }
]

// 车辆类型：1-小型客车、2-中型客车、3-大型客车
export const vehicleTypeOptions = [
  {
    get label() {
      return g_t('fleet.smallBus')
    },
    value: '1'
  },
  {
    get label() {
      return g_t('fleet.mediumBus')
    },
    value: '2'
  },
  {
    get label() {
      return g_t('fleet.largeBus')
    },
    value: '3'
  }
]

// 车辆状态：1-正常、2-停用
export const vehicleStatusOptions = [
  {
    get label() {
      return g_t('public.normal')
    },
    value: '1',
    class: 'success'
  },
  {
    get label() {
      return g_t('public.stopUsing')
    },
    value: '2',
    class: 'danger'
  }
]

// 车辆使用状态：1-空闲、2-使用中
export const vehicleUseStatusOptions = [
  {
    get label() {
      return g_t('fleet.idle')
    },
    value: '1',
    class: 'info'
  },
  {
    get label() {
      return g_t('fleet.inUseing')
    },
    value: '2',
    class: 'success'
  }
]

// 数据权限
export const dataPermOptions = [
  {
    get label() {
      return g_t('userCenter.deptAndSubDepts')
    },
    value: '1'
  }
]

// 租户状态：1-正常（默认），2-停用
export const organizeStatusOptions = [
  {
    get label() {
      return g_t('public.normal')
    },
    value: '1'
  },
  {
    get label() {
      return g_t('public.stopUsing')
    },
    value: '2'
  }
]

// 用户状态：1-正常（默认），2-停用
export const userStatusOptions = [
  {
    get label() {
      return g_t('public.normal')
    },
    value: 1
  },
  {
    get label() {
      return g_t('public.stopUsing')
    },
    value: '2'
  }
]

// 用户类型：1-超级管理员，2-企业客户，3-子账号，4-消费者
export const userTypeOptions = [
  {
    get label() {
      return g_t('userCenter.superAdmin')
    },
    value: '1'
  },
  {
    get label() {
      return g_t('userCenter.enterpriseCustomer')
    },
    value: '2'
  },
  {
    get label() {
      return g_t('userCenter.subAccount')
    },
    value: '3'
  },
  {
    get label() {
      return g_t('userCenter.consumer')
    },
    value: '4'
  }
]

// 角色类型：1-系统内置角色，2-平台共享角色，3-用户自定义角色
export const roleTypeOptions = [
  {
    get label() {
      return g_t('userCenter.systemBuiltInRole')
    },
    value: '1'
  },
  {
    get label() {
      return g_t('userCenter.platformSharedRole')
    },
    value: '2'
  },
  {
    get label() {
      return g_t('userCenter.userDefinedRole')
    },
    value: '3'
  }
]

/**
 * 订车管理的订单状态
 * 状态：1-询价中、2-待订车确认、3-已确认、4-进行中、5-已完成、6-已取消、7-已过期
 */
export const orderStatusOptions = [
  {
    get label() {
      return g_t('travelAgency.inquiring')
    },
    value: '1',
    class: 'info'
  },
  {
    get label() {
      return g_t('fleet.pendingCarConfirm')
    },
    value: '2',
    class: 'info'
  },
  {
    get label() {
      return g_t('fleet.confirmed')
    },
    value: '3',
    class: 'success'
  },
  {
    get label() {
      return g_t('fleet.inProgress')
    },
    value: '4',
    class: 'wait'
  },
  {
    get label() {
      return g_t('fleet.completed')
    },
    value: '5',
    class: 'success'
  },
  {
    get label() {
      return g_t('fleet.canceled')
    },
    value: '6',
    class: 'danger'
  },
  {
    get label() {
      return g_t('travelAgency.expired')
    },
    value: '7',
    class: 'danger'
  }
]

/**
 * 是否分车
 * 状态：1-未分车、2-已分车
 */
export const separateCarsOptions = [
  {
    get label() {
      return g_t('fleet.unAssigned')
    },
    value: '1',
    class: 'info'
  },
  {
    get label() {
      return g_t('fleet.assigned')
    },
    value: '2',
    class: 'success'
  }
]

// 是否往返
export const roundTripOptions = [
  {
    get label() {
      return g_t('public.isYes')
    },
    value: '2'
  },
  {
    get label() {
      return g_t('public.isNo')
    },
    value: '1'
  }
]

// 车辆计费方式：1-按天计费，2-按里程计费
export const vehicleBillingMethodOptions = [
  {
    get label() {
      return g_t('fleet.dailyBill')
    },
    value: '1'
  },
  {
    get label() {
      return g_t('fleet.mileageBill')
    },
    value: '2'
  }
]

// 支付方式：1-线上支付，2-线下支付
export const orderPayMethodOptions = [
  {
    get label() {
      return g_t('fleet.onlinePay')
    },
    value: '1'
  },
  {
    get label() {
      return g_t('fleet.offlinePay')
    },
    value: '2'
  }
]

// 房间状态：1-空闲，2-使用，3-清洁，4-异常
export const roomStatusOptions = [
  {
    get label() {
      return g_t('fleet.idle')
    },
    value: '1',
    class: 'info'
  },
  {
    get label() {
      return g_t('fleet.inUse')
    },
    value: '2',
    class: 'success'
  },
  {
    get label() {
      return g_t('hotel.clean')
    },
    value: '3',
    class: 'info'
  },
  {
    get label() {
      return g_t('fleet.abnormal')
    },
    value: '4',
    class: 'danger'
  }
]

// 业务类型：0-其他，1-直供，2-合约，3-订房中心
export const businessTypeOptions = [
  {
    get label() {
      return g_t('hotel.directSupply')
    },
    value: '1'
  },
  {
    get label() {
      return g_t('hotel.contract')
    },
    value: '2'
  },
  {
    get label() {
      return g_t('hotel.bookingCenter')
    },
    value: '3'
  },
  {
    get label() {
      return g_t('hotel.others')
    },
    value: '0'
  }
]

/**
 * 订房管理的订单状态
 * 订单状态：1-待分配、2-已确认、3-已分配、4-进行中、5-已完成、6-已取消
 */
export const bookingOrderStatusOptions = [
  {
    get label() {
      return g_t('fleet.pendingAllocation')
    },
    value: '1',
    class: 'info'
  },
  {
    get label() {
      return g_t('fleet.confirmed')
    },
    value: '2',
    class: 'success'
  },
  {
    get label() {
      return g_t('fleet.allocated')
    },
    value: '3',
    class: 'wait'
  },
  {
    get label() {
      return g_t('fleet.inProgress')
    },
    value: '4',
    class: 'wait'
  },
  {
    get label() {
      return g_t('fleet.completed')
    },
    value: '5',
    class: 'success'
  },
  {
    get label() {
      return g_t('fleet.canceled')
    },
    value: '6',
    class: 'danger'
  }
]

/**
 * 订票管理的业务类型
 * 业务类型：0-其他，1-直供，2-合约，3-订票中心
 */
export const ticketBusinessTypeOptions = [
  {
    get label() {
      return g_t('hotel.directSupply')
    },
    value: '1'
  },
  {
    get label() {
      return g_t('hotel.contract')
    },
    value: '2'
  },
  {
    get label() {
      return g_t('ticket.bookingCenter')
    },
    value: '3'
  },
  {
    get label() {
      return g_t('hotel.others')
    },
    value: '0'
  }
]

/**
 * 订票管理的订单状态
 * 状态：1-已启用，2-已确认，3-已作废，4-已完成
 */
export const ticketOrderStatusOptions = [
  {
    get label() {
      return g_t('travelAgency.enabled')
    },
    value: '1',
    class: 'info'
  },
  {
    get label() {
      return g_t('fleet.confirmed')
    },
    value: '2',
    class: 'success'
  },
  {
    get label() {
      return g_t('ticket.voided')
    },
    value: '3',
    class: 'wait'
  },
  {
    get label() {
      return g_t('fleet.completed')
    },
    value: '4',
    class: 'wait'
  }
]

// 价格类型：1-平日价格，2-周末价格，3-节假日价格，4-会员价格，5-促销价格
export const priceTypeOptions = [
  {
    get label() {
      return g_t('hotel.weekdayPrice')
    },
    value: '1'
  },
  {
    get label() {
      return g_t('hotel.weekendPrice')
    },
    value: '2'
  },
  {
    get label() {
      return g_t('hotel.holidayPrice')
    },
    value: '3'
  },
  {
    get label() {
      return g_t('hotel.memberPrice')
    },
    value: '4'
  },
  {
    get label() {
      return g_t('hotel.promotionPrice')
    },
    value: '5'
  }
]

// 支付方式：1-挂账，2-现付
export const orderPayMethod2Options = [
  {
    get label() {
      return g_t('hotel.creditAccount')
    },
    value: '1'
  },
  {
    get label() {
      return g_t('hotel.cashPayment')
    },
    value: '2'
  }
]

// 产品类型：0-其它，1-国内，2-出境，3-邮轮，4-周边，5-入境
export const productTypeOptions = [
  {
    get label() {
      return g_t('hotel.others')
    },
    value: '0'
  },
  {
    get label() {
      return g_t('travelAgency.domestic')
    },
    value: '1'
  },
  {
    get label() {
      return g_t('travelAgency.outbound')
    },
    value: '2'
  },
  {
    get label() {
      return g_t('travelAgency.cruiseShip')
    },
    value: '3'
  },
  {
    get label() {
      return g_t('travelAgency.perimeter')
    },
    value: '4'
  },
  {
    get label() {
      return g_t('travelAgency.entryCountry')
    },
    value: '5'
  }
]

// 类别状态：1-已启用，2-未启用
export const categoryStatusOptions = [
  {
    get label() {
      return g_t('travelAgency.enabled')
    },
    value: '1',
    class: 'success'
  },
  {
    get label() {
      return g_t('travelAgency.disabled')
    },
    value: '2',
    class: 'danger'
  }
]

// 合同类型：1-国内游，2-出境游
export const contractTypeOptions = [
  {
    get label() {
      return g_t('travelAgency.domesticTour')
    },
    value: '1'
  },
  {
    get label() {
      return g_t('travelAgency.outboundTour')
    },
    value: '2'
  }
]

// 线路状态：1-已启用，2-未启用
export const routeStatusOptions = [
  {
    get label() {
      return g_t('travelAgency.enabled')
    },
    value: '1',
    class: 'success'
  },
  {
    get label() {
      return g_t('travelAgency.disabled')
    },
    value: '2',
    class: 'danger'
  }
]

// 团期状态：1-未启用、2-已启用、3-已确认、4-已取消
export const tourDateStatusOptions = [
  {
    get label() {
      return g_t('travelAgency.disabled')
    },
    value: '1',
    class: 'info'
  },
  {
    get label() {
      return g_t('travelAgency.enabled')
    },
    value: '2',
    class: 'success'
  },
  {
    get label() {
      return g_t('fleet.confirmed')
    },
    value: '3',
    class: 'success'
  },
  {
    get label() {
      return g_t('fleet.canceled')
    },
    value: '4',
    class: 'wait'
  }
]

// 团期类型：1-散拼，2-包团
export const groupPeriodTypeOptions = [
  {
    get label() {
      return g_t('travelAgency.individualGroup')
    },
    value: '1'
  },
  {
    get label() {
      return g_t('travelAgency.charterGroup')
    },
    value: '2'
  }
]

// 线路类型：1-自定义线路，2-固定线路
export const routeTypeOptions = [
  {
    get label() {
      return g_t('travelAgency.customRoute')
    },
    value: '1'
  },
  {
    get label() {
      return g_t('travelAgency.fixedRoute')
    },
    value: '2'
  }
]

// 询价单的 状态：1-询价中，2-询价已确认，3-订单已确认，4-已完成，5-已取消
export const inquiryOrderStatusOptions = [
  {
    get label() {
      return g_t('travelAgency.inquiring')
    },
    value: '1',
    class: 'info'
  },
  {
    get label() {
      return g_t('travelAgency.inquiryConfirm')
    },
    value: '2',
    class: 'success'
  },
  {
    get label() {
      return g_t('travelAgency.orderConfirm')
    },
    value: '3',
    class: 'success'
  },
  {
    get label() {
      return g_t('fleet.completed')
    },
    value: '4',
    class: 'success'
  },
  {
    get label() {
      return g_t('fleet.canceled')
    },
    value: '5',
    class: 'wait'
  }
]

// 询价单的 类型：car-订车，hotel-订房，ticket-订票，meal-订餐
export const inquiryFormTypeOptions = [
  {
    get label() {
      return g_t('travelAgency.bookVehicle')
    },
    value: 'car'
  },
  {
    get label() {
      return g_t('travelAgency.bookRoom')
    },
    value: 'hotel'
  },
  {
    get label() {
      return g_t('travelAgency.bookTicket')
    },
    value: 'ticket'
  }
  // {
  //   get label() {
  //     return g_t('travelAgency.bookMeal')
  //   },
  //   value: 'meal'
  // }
]

// 消息管理 类型：1-团期询价，2-订车询价单，3-订房询价单，4-订票询价单，5-订餐询价单
export const msgTypeOptions = [
  {
    label: '/travelAgency/tourDate',
    value: '1'
  },
  {
    label: '/fleet/carBooking',
    value: '2'
  },
  {
    label: '/hotel/booking',
    value: '3'
  },
  {
    label: '/ticket/booking',
    value: '4'
  },
  {
    label: '/msgQueue',
    value: '5'
  }
]

// 周几 '周日', '周一', '周二', '周三', '周四', '周五', '周六'
export const dateDayOptions = [
  {
    get label() {
      return g_t('public.sunday')
    },
    value: '0'
  },
  {
    get label() {
      return g_t('public.monday')
    },
    value: '1'
  },
  {
    get label() {
      return g_t('public.tuesday')
    },
    value: '2'
  },
  {
    get label() {
      return g_t('public.wednesday')
    },
    value: '3'
  },
  {
    get label() {
      return g_t('public.thursday')
    },
    value: '4'
  },
  {
    get label() {
      return g_t('public.friday')
    },
    value: '5'
  },
  {
    get label() {
      return g_t('public.saturday')
    },
    value: '6'
  }
]

// 类型：1、食2、住3、行4、游5、购6、娱7、其他
export const costItemTypeOptions = [
  {
    get label() {
      return g_t('travelAgency.food')
    },
    value: '1'
  },
  {
    get label() {
      return g_t('travelAgency.hotel')
    },
    value: '2'
  },
  {
    get label() {
      return g_t('travelAgency.traffic')
    },
    value: '3'
  },
  {
    get label() {
      return g_t('travelAgency.travel')
    },
    value: '4'
  },
  {
    get label() {
      return g_t('travelAgency.shopping')
    },
    value: '5'
  },
  {
    get label() {
      return g_t('travelAgency.entertainment')
    },
    value: '6'
  },
  {
    get label() {
      return g_t('travelAgency.other')
    },
    value: '7'
  }
]

// 资料类型：1-行程总览，2-行程特色，3-参考路线，4-参考酒店，5-参考美食，6-费用说明，7-购物项目，8-注意事项，9-改退签规则
export const routeDataTypeOptions = [
  {
    get label() {
      return g_t('travelAgency.itineraryOverview')
    },
    value: '1'
  },
  {
    get label() {
      return g_t('travelAgency.itineraryFeatures')
    },
    value: '2'
  },
  {
    get label() {
      return g_t('travelAgency.referenceRoute')
    },
    value: '3'
  },
  {
    get label() {
      return g_t('travelAgency.referenceHotel')
    },
    value: '4'
  },
  {
    get label() {
      return g_t('travelAgency.referenceCuisine')
    },
    value: '5'
  },
  {
    get label() {
      return g_t('travelAgency.costDescription')
    },
    value: '6'
  },
  {
    get label() {
      return g_t('travelAgency.shoppingItems')
    },
    value: '7'
  },
  {
    get label() {
      return g_t('travelAgency.precautions')
    },
    value: '8'
  },
  {
    get label() {
      return g_t('travelAgency.refundPolicy')
    },
    value: '9'
  }
]

// 状态: 1-未审核、2-已审核
export const costStatusOptions = [
  {
    get label() {
      return g_t('travelAgency.unreviewed')
    },
    value: '1'
  },
  {
    get label() {
      return g_t('travelAgency.reviewed')
    },
    value: '2'
  }
]

// 订单状态（1-已确认，2-已担保，3-预留中，4-已清位，5-已撤销，6-已取消）
export const routeOrderStatusOptions = [
  {
    get label() {
      return g_t('travelAgency.confirmed')
    },
    value: '1'
  },
  {
    get label() {
      return g_t('travelAgency.guaranteed')
    },
    value: '2'
  },
  {
    get label() {
      return g_t('travelAgency.reserved')
    },
    value: '3'
  },
  {
    get label() {
      return g_t('travelAgency.positionCleared')
    },
    value: '4'
  },
  {
    get label() {
      return g_t('travelAgency.revoked')
    },
    value: '5'
  },
  {
    get label() {
      return g_t('travelAgency.cancelled')
    },
    value: '6'
  }
]

// 占位（1-占位，2-不占）
export const placeholderOptions = [
  {
    get label() {
      return g_t('travelAgency.placeholder')
    },
    value: '1'
  },
  {
    get label() {
      return g_t('travelAgency.notOccupy')
    },
    value: '2'
  }
]

// 团期成本询价单的 类型：1、食2、住3、行4、游5、购6、娱7、其他
export const inquiryCoseTypeOptions = [
  {
    get label() {
      return g_t('travelAgency.food')
    },
    value: '1'
  },
  {
    get label() {
      return g_t('travelAgency.hotel')
    },
    value: '2'
  },
  {
    get label() {
      return g_t('travelAgency.traffic')
    },
    value: '3'
  },
  {
    get label() {
      return g_t('travelAgency.travel')
    },
    value: '4'
  },
  {
    get label() {
      return g_t('travelAgency.shopping')
    },
    value: '5'
  },
  {
    get label() {
      return g_t('travelAgency.entertainment')
    },
    value: '6'
  },
  {
    get label() {
      return g_t('travelAgency.other')
    },
    value: '7'
  }
]

// 线路管理的 类型：1、食2、住3、行4、游5、购6、娱7、其他 8、总
export const lineTypeOptions = [
  {
    get label() {
      return g_t('travelAgency.total')
    },
    value: '8'
  },
  {
    get label() {
      return g_t('travelAgency.food')
    },
    value: '1'
  },
  {
    get label() {
      return g_t('travelAgency.hotel')
    },
    value: '2'
  },
  {
    get label() {
      return g_t('travelAgency.traffic')
    },
    value: '3'
  },
  {
    get label() {
      return g_t('travelAgency.travel')
    },
    value: '4'
  },
  {
    get label() {
      return g_t('travelAgency.shopping')
    },
    value: '5'
  },
  {
    get label() {
      return g_t('travelAgency.entertainment')
    },
    value: '6'
  },
  {
    get label() {
      return g_t('travelAgency.other')
    },
    value: '7'
  }
]

// 币种：美元（USD）、欧元（EUR）、日元（JPY）、英镑（GBP）、人民币（CNY）、港币（HKD）、澳门币（MOP）
export const currencyOptions = [
  {
    get label() {
      return g_t('travelAgency.usd')
    },
    value: 'USD'
  },
  {
    get label() {
      return g_t('travelAgency.eur')
    },
    value: 'EUR'
  },
  {
    get label() {
      return g_t('travelAgency.jpy')
    },
    value: 'JPY'
  },
  {
    get label() {
      return g_t('travelAgency.gbp')
    },
    value: 'GBP'
  },
  {
    get label() {
      return g_t('travelAgency.cny')
    },
    value: 'CNY'
  },
  {
    get label() {
      return g_t('travelAgency.hkd')
    },
    value: 'HKD'
  },
  {
    get label() {
      return g_t('travelAgency.mop')
    },
    value: 'MOP'
  }
]

//审核状态 1-待审核，2-已审核，3-已拒绝
export const auditStatusOptions = [
  {
    get label() {
      return g_t('supplier.pendingReview')
    },
    value: 1
  },
  {
    get label() {
      return g_t('supplier.reviewed')
    },
    value: 2
  },
  {
    get label() {
      return g_t('supplier.rejected')
    },
    value: 3
  }
]


//状态 1-正常，2-锁定
export const statusOptions = [
  {
    get label() {
      return g_t('supplier.normal')
    },
    value: 1
  },
  {
    get label() {
      return g_t('supplier.locked')
    },
    value: 2
  }
]